Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exercises(triangle): return an optional, not an error union #257

Closed
wants to merge 1 commit into from

Conversation

ee7
Copy link
Member

@ee7 ee7 commented Mar 12, 2023

We simplified the error set to contain only one error (4a4665a), so there's an argument to use an optional instead.

Refs: #229


Thoughts on whether this is an improvement? I'm not convinced for this particular exercise. Basically, if you call init with some strange side lengths, do you want an error or null?

I'll did this to see what it'd look like as null, but I'm leaning towards closing this PR. We can reopen it if we feel it's worth considering.

We simplified the error set to contain only one error [1], so there's an
argument to use an optional instead.

[1] 4a4665a exercises(triangle): simplify error set (2023-03-12)

Refs: exercism#229
@ee7 ee7 closed this Mar 12, 2023
@ee7 ee7 changed the title exercises(triangle): return optional, not error union exercises(triangle): return an optional, not an error union Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant